body{
    color: #000;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: none;
    font: normal 14px/1.5 Tahoma,"Lucida Grande",Verdana,"Microsoft Yahei",STXihei,hei;
    max-width: 540px;
    min-width: 320px;
    margin: 0 auto;
    background: #f2f2f2;
}
a{
    text-decoration: none;
    color: #222;
}

div{
    box-sizing: border-box;
}
ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 搜索框 */

.search-index{
    display: flex;
    position: fixed;
    top: 0;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    /* 固定的盒子应该有宽度 */
    width: 100%;
    min-width: 320px;
    max-width: 540px;
    height: 44px;
    background-color: #f6f6f6;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.search{
    position: relative;
    flex: 1;
    font-size: 12px;
    /* background: pink; */
    height: 26px;
    /* 因为用的是css3盒模型，行高跟高度一样高不是居中 */
    line-height: 24px;
    font-size: 12px;
    color: #666;
    border: 1px solid #ccc;
    margin: 7px 10px;
    padding-left: 25px;
    border-radius: 5px;
    /* 盒子阴影效果 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);

}
.search::before{
    content: "";
    /* 给个绝对定位，可以改宽高，也不像块级元素搬 */
    position: absolute;
    top: 4px;
    left: 4px;
    width: 15px;
    height: 15px;
    background: url(../img/ic_serch.png) no-repeat;
    background-size: 15px;
}

.user{
    width: 44px;
    height: 44px;
    /* background: green; */
    font-size: 12px;
    text-align: center;
    /* line-height: 14px; */
    color: #2eaae0;
}

.user::before{
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    margin: 3px auto -2px;
    background: url(../img/tabbar.png) no-repeat;
    background-size: 24px auto;
    background-position: 0 -72px;
}

/* 焦点图 */
.focus{
    padding-top: 44px;
}
.focus img{
    width: 100%;
}

/* 局部导航栏 */

.local-nav{
    display: flex;
    height: 64px;
    background-color: #fff;
    margin: 3px 4px;
    border-radius: 8px;
}

.local-nav li{
    flex: 1;
}
.local-nav a{
    display: flex;
    flex-direction: column;
    /* 侧轴居中对齐,因为是单行，所以用该属性 */
    align-items: center;
    font-size: 12px;
}
.local-nav-icon{
    width: 32px;
    height: 32px;
    /* background-color: pink; */
    margin-top: 8px;
    background: url(../img/mainnav.png) no-repeat;
    background-size: 32px auto;
    background-position: 0 -384px;
}

/* nav */

nav{
    border-radius: 8px;
    margin: 0 4px 3px;
    overflow: hidden;
}
.nav-common{
    display: flex;
    height: 88px;
    /* background-color: pink; */

}
.nav-common:nth-child(1){
    background: -webkit-linear-gradient(left,#fa5a55,#fa994d);
}

.nav-common:nth-child(2){ 
    margin: 3px 0;
    background: -webkit-linear-gradient(left,#4b90ed,#53bced);
}

.nav-common:nth-child(3){
    background: -webkit-linear-gradient(left,#34c2a9,#6cd559);
}
/* nav下的nav小项目 */
.nav-items{
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nav-items:nth-child(1){
    flex-direction: column-reverse;
}

/* :nth-child()选择器的练习  div已经使用了box-sizing属性*/
.nav-items:nth-child(-n+2){
    border-right: 1px solid #fff;
}


.nav-items a{
    flex: 1;
    text-align: center;
    line-height: 44px;
    color: #fff;
    font-size: 14px;
    /* 文字阴影 */
    text-shadow: 1px 1px rgba(0, 0, 0, .2);

}
.nav-items a:nth-child(1){
    border-bottom: 1px solid #fff;

}
/* 重写第一个盒子的a，少数的重写就行了 */
.nav-items:nth-child(1) a{
    border: 0;
    line-height: 44px;
    margin-bottom: -20px;
    /* background-color: #000; */
}

.nav-items span{
    height: 60px;
    width: 60px;
    margin: auto;
    background: url(../img/mainnav.png) no-repeat 0 -180px;
    background-size: 60px auto;
    /* background-color: red; */
}


/* 侧导航栏制作 */

.subnav-entry{
    display: flex;
    border-radius: 8px;
    background-color: #fff;
    margin: 0 4px;
    flex-wrap: wrap;
    padding: 5px 0;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.subnav-entry li{
    /* 里面的子盒子可以用百分比，相对父盒子来说 */
    flex:20%;
}

.subnav-entry a{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subnav-entry-icon{
    width: 28px;
    height: 28px;
    background-color: pink;
    margin-top: 4px;
    background: url(../img/mainnav.png) no-repeat;
    background-size: 28px auto;
    background-position: 0 -112px;
}

/* 热门模块 */

.sales-box{
    border-top: 1px solid #ccc;
    background-color: #fff;
    margin: 4px;
}
.sales-hd{
    position: relative;
    height: 44px;
    border-bottom: 1px solid #ccc;
}

.sales-hd h2{
    position: relative;
    /* 隐藏文字 */
    text-indent: -999px;
    overflow: hidden;
}
.sales-hd h2::after{
    position: absolute;
    top: 7px;
    left: 8px;
    content: "";
    width: 79px;
    height: 15px;
    background: url(../img/7.png) no-repeat;
    background-position: 0 -4px;
}

.more{
    position: absolute;
    top: 0px;
    right: 0px;
    /* width: 90px;
    height: 14px; */
    /* font-size: 12px; */
    background: -webkit-linear-gradient(left,#ff506c,#ff6bc6);
    padding: 3px 20px 3px 10px;
    /* line-height: 14px; */
    /* text-align: center; */
    border-radius: 15px;
    color: #fff;

}
.more::after{
    /* 用外边框做箭头符号 */
    content: "";
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
}

.row{
    display: flex;
}
.row a{
    flex: 1;
    border-bottom: 1px solid #eee;
}
.row a:nth-child(1){
    border-right: 1px solid #eee;
}
.row a img{
    width: 100%;
}

/* 主导航栏 */

.host{
    display: flex;
    
    /* 这里的居中用左右0，margin值为auto做，也可以用left，transform位移来做 */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    height: 49px;
    box-shadow: 0 -5px 15px 0 rgb(0 0 0 / 5%);
}
.host div{
    flex: 1;
    background-color: #fff;
}
.host div:nth-child(-n+2){
    border-right: 1px solid #fff;
}
.host div a{
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: 11px;
    color: #666;
    align-items: center;
}
.host div .icon{
    height: 32px;
    width: 32px;
    background: url(../img/tabbar.png) no-repeat 0 0;
    background-size: 32px;
}
.host div a span:nth-child(2){
    margin-top: -2px;
}
.host div:nth-child(2) .icon{
    background: url(../img/tabbar.png) no-repeat 0 -32px;
    background-size: 32px;

}
.host div:nth-child(3) .icon{
    background: url(../img/tabbar.png) no-repeat 0 -96px;
    background-size: 32px;
}

.footer{
    height: 100px;
    color: #666;
}

.footer div{
    margin: 6px auto;
    text-align: center;
}
.footer div a{
    color: #666;
}
.footer div a:nth-child(1)::after{
    content: "";
    padding-right: 10px;
    margin-right: 15px;
    /* display: block; */
    border-right: 1px solid #ccc;
}



